1. Technical Field
The present invention relates to an improved data processing system and, in particular, to a method and system for computer graphics processing system, specifically, for adjusting the surface detail/characteristic of a computer-based image.
2. Description of Related Art
Digital image processing is computationally expensive. Data processing systems usually contain several performance enhancements for increasing the speed at which digital images can be processed, but these enhancements are generally accompanied by quality tradeoffs. It can be a challenge to increase the performance of the image processing operations while still producing acceptable quality images.
The efficiency of the image filters is one factor affecting the efficiency of a data processing system. Image filtering is performed during a variety of computer graphics-related functions. For example, texture filtering involves averaging the colors of surrounding texels, i.e. one picture element from a texture map, to determine the texture color of a resulting pixel. Filtering techniques can reduce blockiness when the image is zoomed in and can reduce speckling when the image is zoomed out.
Bilinear filtering is one of the more common approaches for smoothing a resulting image. Linear interpolation finds intermediate values by applying a fixed value change for a fixed step size. Bilinear interpolation applies this process in two dimensions. For example, bilinear interpolation may be used to find texture values at the interior pixels of a primitive, such as a polygon, in which the values are known at the vertices.
Another filtering approach uses the sinc filter, named for the mathematical relation sin(x)/x. This technique adds proportional weighting to each of the sample pixels, whereas bilinear approaches affect the image equally. On the other hand, the speed of a bilinear filter is relatively quick, whereas the evaluation of the sinc function is computationally expensive.
Yet another approach uses a bicubic filter, which is defined by the mathematical function, 2x3xe2x88x923x2+1=(2*xxe2x88x923)*x*x+1, which requires 3 multiplications and 2 additions. Multiplications are more expensive than additions, so it is desirable to find a technique that can produce good quality yet reduce the number of multiplications, even if the number of additions is increased slightly. However, due to the nature of human vision, a nonlinear filter, such as sinc or bicubic, produces better results than a bilinear approach.
Therefore, it would be advantageous to enhance the performance of a filtering process by reducing its computational costs compared to standard methods while maintaining similar quality in the resulting images.
A method and system for an approximation of a filter function for computing a characteristic value of an output pixel based on characteristic values of a plurality of input pixels is provided. A filter response curve adjustment value is obtained, preferably from a lookup table, based on a distance interval between coordinates of the output pixel and coordinates of a selected input pixel. A normalized filter response curve input value is computed based on the distance interval and the filter response curve adjustment value, preferably by adding the values together. The characteristic values at a plurality of input pixels are obtained. A linearly interpolated value for the characteristic value of the output pixel is then computed based on the characteristic values of the plurality of input pixels and the normalized filter response curve input value.